<%@ page language="java" contentType="text/html; charset=utf-8"%>
<%@ include file="/taglibs.jsp"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 4.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

<title>连杭科技-IT管理</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<%@	include file="/js/js.js"%>
</head>
<style type="text/css">
input,textarea {
	width: 200px;
	border: 1px solid #A4BED4;
	padding: 2px;
}
</style>
<script>
$(function(){
	$("#layout").layout({
		 loadingMessage:"页面加载中，请稍候..."
	});
	$("#loginDiv").dialog({
		closable:false,
		title:"管理员登录",
		iconCls:"icon-friends",
		width:390,
		height:225,
		loadingMessage:"页面加载中，请稍候..." 
	});
	
	$("#dlm").validatebox({
		required:true,
		missingMessage:"用户名不能为空！"
	});
	
	$("#mm").validatebox({
		required:true,
		missingMessage:"密码不能为空！"
	});
	
	$("#dlm").focus();
});
login = function(){
	$("#loginForm").form('submit', {
				  url:"/login",
				  onSubmit:function(){
				        return $("#loginForm").form('validate');
				    },
				  success:function(data){
				      if (data=='error'){ 
				        	$.messager.alert('信息提示','登录出错，请检查输入！','error');
				      }
				      if(data=='success'){
				    	  window.location.href="/itmanager";
				      }
				  }  
	});  
}

reset = function(){
	$('#loginForm').form('clear');
 }

</script>
<body id="layout" onkeydown="if(event.keyCode==13)login()">
	<div region="center" fit="fit" style="background: #E0ECFF;">
		<div id="loginDiv" buttons="#buttons" style="padding: 20px">
			<form id="loginForm" action="/login" method="post">
				<table border="0" width="100%" height="50%">
					<tr>
						<td align="center" width="30%" height="35"><b>用&nbsp;户&nbsp;名</b></td>
						<td align="left"><input id="dlm" name="dlm" type="text" style="width: 60%" />
						</td>
					</tr>
					<tr>
						<td align="center" height="35">
							<b>密&nbsp;&nbsp;&nbsp;&nbsp;码</b>
						</td>
						<td align="left"><input id="mm" name="mm" type="password" style="width: 60%" />
						</td>
					</tr>
				</table>
				<div id="buttons">
					<a href="#" id="dl-button" class="easyui-linkbutton"
						iconCls="icon-ok" onclick="javascript:login()">登陆</a> <a href="#"
						id="dl-button" class="easyui-linkbutton" iconCls="icon-cancel"
						onclick="reset()">重置</a> &nbsp;&nbsp;<br />&nbsp;
				</div>
			</form>
		</div>
	</div>
</body>
</html>
